package  org.fantasy.cpp.core.pojo;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;

import  org.fantasy.common.util.StringUtil;

@Table("QUERY_TEMPLET")
public class QueryTemplet {

	@Id
	@Column("templet_id")
	private Long templetId;

	@Column("templet_name")
	private String templetName;

	@Column("templet_desc")
	private String templetDesc;

	@Column("main_page")
	private String mainPage;

	@Column("create_date")
	private java.util.Date createDate;

	@Column("result_page")
	private String resultPage;

	@Column("state")
	private String state;

	public Long getTempletId() {
		return templetId;
	}

	/**
	 * Set the unique identifier of this class
	 * 
	 * @param id
	 *            the new ID
	 */
	public void setTempletId(Long templetId) {
		this.templetId = templetId;
	}

	/**
	 * Return the value associated with the column: TEMPLET_DESC
	 */
	public String getTempletDesc() {
		return templetDesc;
	}

	/**
	 * Set the value related to the column: TEMPLET_DESC
	 * 
	 * @param templetDesc
	 *            the TEMPLET_DESC value
	 */
	public void setTempletDesc(String templetDesc) {
		this.templetDesc = templetDesc;
	}

	/**
	 * Return the value associated with the column: MAIN_PAGE
	 */
	public String getMainPage() {
		return mainPage;
	}

	/**
	 * Set the value related to the column: MAIN_PAGE
	 * 
	 * @param mainPage
	 *            the MAIN_PAGE value
	 */
	public void setMainPage(String mainPage) {
		this.mainPage = mainPage;
	}

	/**
	 * Return the value associated with the column: TEMPLET_NAME
	 */
	public String getTempletName() {
		return templetName;
	}

	/**
	 * Set the value related to the column: TEMPLET_NAME
	 * 
	 * @param templetName
	 *            the TEMPLET_NAME value
	 */
	public void setTempletName(String templetName) {
		this.templetName = templetName;
	}

	/**
	 * Return the value associated with the column: CREATE_DATE
	 */
	public java.util.Date getCreateDate() {
		return createDate;
	}

	/**
	 * Set the value related to the column: CREATE_DATE
	 * 
	 * @param createDate
	 *            the CREATE_DATE value
	 */
	public void setCreateDate(java.util.Date createDate) {
		this.createDate = createDate;
	}

	/**
	 * Return the value associated with the column: RESULT_PAGE
	 */
	public String getResultPage() {
		return resultPage;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	/**
	 * Set the value related to the column: RESULT_PAGE
	 * 
	 * @param resultPage
	 *            the RESULT_PAGE value
	 */
	public void setResultPage(String resultPage) {
		this.resultPage = resultPage;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof  org.fantasy.cpp.core.pojo.base.BaseQueryTemplet))
			return false;
		else {
			 org.fantasy.cpp.core.pojo.base.BaseQueryTemplet mObj = ( org.fantasy.cpp.core.pojo.base.BaseQueryTemplet) obj;
			if (null == this.getTempletId() || null == mObj.getTempletId())
				return false;
			else
				return (this.getTempletId().equals(mObj.getTempletId()));
		}
	}

	public int hashCode() {
		return templetId.hashCode();
	}

	@Override
	public String toString() {
		return StringUtil.bean2String(this);
	}
}